<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group select-spec">
        <label class="control-label col-xs-12 col-sm-2 add-spec">{:__('Businesstype')}:</label>
        <div class="col-xs-12 col-sm-8 add-spec">

            <select  id="c-businesstype" data-rule="" class="form-control selectpicker" name="row[businesstype]">
                <option value=""></option>
                {foreach name="businesstypeList" item="vo"}
                <option value="{$key}">{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group select-spec">
        <label class="control-label col-xs-12 col-sm-2 add-spec">{:__('Taobaoname')}:</label>
        <div class="col-xs-12 col-sm-8 add-spec">
            <input id="c-taobaoname" data-rule="required" autocomplete="off" class="form-control add-spec" name="row[taobaoname]" type="text" value="">
        </div>
    </div>
    <div class="form-group select-spec">
        <label class="control-label col-xs-12 col-sm-2 add-spec">{:__('Idnumber')}:</label>
        <div class="col-xs-12 col-sm-8 add-spec">
            <input id="c-idnumber" data-rule="IDcard"  autocomplete="off" class="form-control add-spec" name="row[idnumber]" type="text" value="">
        </div>
    </div>
    <div class="form-group select-spec">
        <label class="control-label col-xs-12 col-sm-2 add-spec">{:__('客户姓名')}:</label>
        <div class="col-xs-12 col-sm-8 add-spec">
            <input id="c-name" data-rule="" autocomplete="off" class="form-control add-spec" name="row[name]" type="text" value="">
        </div>
    </div>
    <div class="form-group select-spec">
        <label class="control-label col-xs-12 col-sm-2 add-spec">{:__('客户电话')}:</label>
        <div class="col-xs-12 col-sm-8 add-spec">
            <input id="c-mobile" data-rule="" autocomplete="off" class="form-control add-spec" name="row[mobile]" type="text" value="">
        </div>
    </div>

    <div class="form-group select-spec">
        <label class="control-label col-xs-12 col-sm-2 add-spec">{:__('Paymentnumber')}:</label>
        <div class="col-xs-12 col-sm-8 add-spec">
            <input id="c-paymentnumber" data-rule="" autocomplete="off" class="form-control add-spec" name="row[paymentnumber]" type="text" value="">
        </div>
    </div>

    <div class="form-group select-spec">
        <label for="c-payingcompany" class="control-label col-xs-12 col-sm-2 add-spec">{:__('Payingcompany')}:</label>
        <div class="col-xs-12 col-sm-8 add-spec">

            <select id="c-payingcompany" data-rule="" class="form-control selectpicker" name="row[payingcompany]">
                <option data-type="0" value="0" disabled>{:__('None')}</option>
            </select>

        </div>
    </div>

    <div class="form-group select-spec">
        <label class="control-label col-xs-12 col-sm-2 add-spec">{:__('Paymentbase')}:</label>
        <div class="col-xs-12 col-sm-8 add-spec">
            <input id="c-paymentbase" data-rule="" autocomplete="off" class="form-control add-spec" name="row[paymentbase]" type="number" value="0">
        </div>
    </div>
    <div class="form-group select-spec">
        <label class="control-label col-xs-12 col-sm-2 add-spec">{:__('Paymentamount')}:</label>
        <div class="col-xs-12 col-sm-8 add-spec">
            <input id="c-paymentamount" data-rule="" autocomplete="off" class="form-control add-spec" name="row[paymentamount]" type="number" value="0">
        </div>
    </div>

    <div class="form-group select-spec">
        <label class="control-label col-xs-12 col-sm-2 add-spec">{:__('Monthspaid')}:</label>
        <div class="col-xs-12 col-sm-8 add-spec">
            <input id="c-monthspaid" data-rule="" autocomplete="off" class="form-control add-spec" name="row[monthspaid]" type="number" value="1">
        </div>
    </div>
    <div class="form-group select-spec">
        <label class="control-label col-xs-12 col-sm-2 add-spec">{:__('Yearpayment')}:</label>
        <div class="col-xs-12 col-sm-8 add-spec">
            <input id="c-yearpayment" data-rule="" autocomplete="off" class="form-control add-spec" name="row[yearpayment]" type="text" value="">
        </div>
    </div>

    <div class="form-group select-spec">
        <label class="control-label col-xs-12 col-sm-2 add-spec">{:__('Agencyfees')}:</label>
        <div class="col-xs-12 col-sm-8 add-spec">
            <textarea id="c-agencyfees" class="form-control add-spec" rows="1" name="row[agencyfees]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group select-spec">
        <label class="control-label col-xs-12 col-sm-2 add-spec">{:__('Ordercomment')}:</label>
        <div class="col-xs-12 col-sm-8 add-spec">
            <textarea id="c-ordercomment" class="form-control add-spec" rows="1" name="row[ordercomment]" cols="50"></textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2 add-spec">{:__('操作年月')}:</label>
        <div class="col-xs-4 col-sm-2 add-spec">
            <input id="c-overdueyear" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM" data-use-current="true" name="row[overdueyear]" style="font-size: 20px;" type="text" value="{:date('Y-m')}">
        </div>

        <label class="control-label col-xs-6 col-sm-2 add-spec">{:__('Preprocessing')}:</label>
        <div class="col-xs-6 col-sm-1 add-spec">
            <input type="checkbox" name="row[preprocessing]"  value="是" style="height: 35px;margin-top: -2px; margin-bottom: 1px; vertical-align: middle;">
        </div>
    </div>

    <input id="c-businesstype0" type="hidden" value="">
    <input id="c-payingcompany0" type="hidden" value="">

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-4 add-spec"></label>
        <div class="col-xs-12 col-sm-3 add-spec">
            <!--<button id="c-submit" type="submit" class="btn btn-success btn-embossed disabled" onclick = 'submit2();'>{:__('保存')}</button>-->
            <button id="c-submit" type="button" class="btn btn-success btn-embossed" style="width: 200px" >{:__('保存')}</button>
        </div>
        <button id="c-close" type="button" class="btn btn-success btn-embossed">{:__('关闭')}</button>

    </div>
</form>


<script>
    var cdata = {
        companyList: {:json_encode(array_values($companyList))},
        businesstypeList: {:json_encode(array_values($businesstypeList))},
    };
</script>
